﻿Public Class OLE_PPS
    Public No As Integer        'The PPS index
    Public Name As String       'The PPS Name (In unicode)
    Public Type As Integer      'The PPS Type
    Public PrevPPS As Integer   'The index of the previous PPS
    Public NextPPS As Integer   'The index of the next PPS
    Public DirPPS As Integer    'The index of it's first child if this is a Dir or Root PPS
    Public Time1st As Integer   'A timestamp
    Public Time2nd As Integer   'A timestamp
    Public StartBlock As Integer 'Starting block (small or big) for this PPS's data  inside the container
    Public Size As Integer      'The size of the PPS's data (in bytes)
    Public Data As String       'The PPS's data (only used if it's not using a temporary file)
    Public Children() As OLE_PPS    'Array of child PPS's (only used by Root and Dir PPS's)
    Public OLE As OLEReader     'The pointer to the OLE Reader Class

    Public Sub New(ByVal _No As Integer, ByVal _Name As String, ByVal _Type As Integer, ByVal _Prev As Integer, ByVal _Next As Integer, ByVal _Dir As Integer, ByVal _Time1 As Integer, ByVal _Time2 As Integer, ByVal _Data As String, ByVal _Children() As OLE_PPS)
        No = _No
        Name = _Name
        Type = _Type
        PrevPPS = _Prev
        NextPPS = _Next
        DirPPS = _Dir
        Time1st = _Time1
        Time2nd = _Time2
        Data = _Data
        Children = _Children
        If Not String.IsNullOrEmpty(_Data) Then
            Size = _Data.Length
        Else
            Size = 0
        End If
    End Sub
End Class
